import { HLRouterInfo } from "../entity/HLRouterInfo"


export interface ILifecycle {}


export interface INavLifecycle extends ILifecycle {
  /**
   * 当该NavDestination页面显示时触发此回调
   */
  onShown?(info: HLRouterInfo): void

  /**
   * 当该NavDestination页面隐藏时触发此回调
   */
  onHidden?(info: HLRouterInfo): void

  /**
   * 当该NavDestination挂载之前触发此回调
   */
  onWillAppear?(info: HLRouterInfo): void

  /**
   * 当该Destination显示之前触发此回调
   */
  onWillShow?(info: HLRouterInfo): void

  /**
   * 当该Destination隐藏之前触发此回调
   */
  onWillHide?(info: HLRouterInfo): void

  /**
   * 当该Destination卸载之前触发的生命周期(有转场动画时，在转场动画开始之前触发)
   */
  onWillDisappear?(info: HLRouterInfo): void

  /**
   * NavDestination在组件树上挂载时触发此回调
   */
  onAppear?(info: HLRouterInfo): void

  /**
   * NavDestination从组件树上卸载时触发此回调
   */
  onDisappear?(info: HLRouterInfo): void
}